package com.wishu.finance.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.Data;

/**
 * 金融分期列表
 *
 * @TableName t_jr_product
 */
@TableName(value = "t_jr_product")
@Data
public class TJrProduct implements Serializable {
    /**
     * 主键 自增
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 产品名称
     */
    private String jrProductName;

    /**
     * 资方信息ID
     */
    private Long companyId;

    /**
     * 资金提供方
     */
    private String companyName;

    /**
     * 分期期限(-1表示无限期)
     */
    private Long instalmentPeriod;

    /**
     * 授信额度(单位：%，比如80%，存的是80)
     */
    private BigDecimal creditLine;

    /**
     * 金融产品类型
     * ,"1：租房分期
     * 2：收房贷
     * 3：应收租约保理"
     */
    private Integer jrProductType;

    /**
     * 还款方式
     * ,"1：按月还款
     * 2：按季还款
     * 3：按租约周期支付"
     */
    private Integer repaymentType;

    /**
     * 支付PC链接(URL)
     */
    private String urlPayPc;

    /**
     * 支付移动链接(URL)
     */
    private String urlPayMoble;

    /**
     * 补全信息PC(URL)
     */
    private String urlAddDetailInfoPc;

    /**
     * 补全信息移动(URL)
     */
    private String urlAddDetailInfoMobile;

    /**
     * App下载(URL)
     */
    private String urlAppDownload;

    /**
     * 银行账户类型（对公账户、对私账户）AccountTypeEnum
     */
    private Integer accountType;

    /**
     * 银行卡号
     */
    private String bankCardNumber;

    /**
     * 开户银行ID
     */
    private Long bankId;

    /**
     * 银行名称
     */
    private String bankName;

    /**
     * 开户行(支行)
     */
    private String openingBank;

    /**
     * 账户名称（对公为企业名称，对私为姓名）
     */
    private String accountName;

    /**
     * 联行行号（手输，对公必须）
     */
    private String bankBranchCodeLh;

    /**
     * 开户行所在省ID
     */
    private Integer bankAccountProvince;

    /**
     * 申请条件
     */
    private String applicationConditions;

    /**
     * 风控要求
     */
    private String riskRequirement;

    /**
     * 预留字段1
     */
    private Integer reserve1;

    /**
     * 预留字段2
     */
    private Integer reserve2;

    /**
     * 预留字段3
     */
    private String reserve3;

    /**
     * 预留字段4
     */
    private String reserve4;

    /**
     * 预留字段5
     */
    private String reserve5;

    /**
     * 删除标识
     * ,0:未删除，1：删除
     */
    private Boolean delFlg;

    /**
     * 创建用户ID
     */
    private Long createUserid;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新用户ID
     */
    private Long updateUserid;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TJrProduct other = (TJrProduct) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getJrProductName() == null ? other.getJrProductName() == null : this.getJrProductName().equals(other.getJrProductName()))
                && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
                && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName()))
                && (this.getInstalmentPeriod() == null ? other.getInstalmentPeriod() == null : this.getInstalmentPeriod().equals(other.getInstalmentPeriod()))
                && (this.getCreditLine() == null ? other.getCreditLine() == null : this.getCreditLine().equals(other.getCreditLine()))
                && (this.getJrProductType() == null ? other.getJrProductType() == null : this.getJrProductType().equals(other.getJrProductType()))
                && (this.getRepaymentType() == null ? other.getRepaymentType() == null : this.getRepaymentType().equals(other.getRepaymentType()))
                && (this.getUrlPayPc() == null ? other.getUrlPayPc() == null : this.getUrlPayPc().equals(other.getUrlPayPc()))
                && (this.getUrlPayMoble() == null ? other.getUrlPayMoble() == null : this.getUrlPayMoble().equals(other.getUrlPayMoble()))
                && (this.getUrlAddDetailInfoPc() == null ? other.getUrlAddDetailInfoPc() == null : this.getUrlAddDetailInfoPc().equals(other.getUrlAddDetailInfoPc()))
                && (this.getUrlAddDetailInfoMobile() == null ? other.getUrlAddDetailInfoMobile() == null : this.getUrlAddDetailInfoMobile().equals(other.getUrlAddDetailInfoMobile()))
                && (this.getUrlAppDownload() == null ? other.getUrlAppDownload() == null : this.getUrlAppDownload().equals(other.getUrlAppDownload()))
                && (this.getAccountType() == null ? other.getAccountType() == null : this.getAccountType().equals(other.getAccountType()))
                && (this.getBankCardNumber() == null ? other.getBankCardNumber() == null : this.getBankCardNumber().equals(other.getBankCardNumber()))
                && (this.getBankId() == null ? other.getBankId() == null : this.getBankId().equals(other.getBankId()))
                && (this.getBankName() == null ? other.getBankName() == null : this.getBankName().equals(other.getBankName()))
                && (this.getOpeningBank() == null ? other.getOpeningBank() == null : this.getOpeningBank().equals(other.getOpeningBank()))
                && (this.getAccountName() == null ? other.getAccountName() == null : this.getAccountName().equals(other.getAccountName()))
                && (this.getBankBranchCodeLh() == null ? other.getBankBranchCodeLh() == null : this.getBankBranchCodeLh().equals(other.getBankBranchCodeLh()))
                && (this.getBankAccountProvince() == null ? other.getBankAccountProvince() == null : this.getBankAccountProvince().equals(other.getBankAccountProvince()))
                && (this.getApplicationConditions() == null ? other.getApplicationConditions() == null : this.getApplicationConditions().equals(other.getApplicationConditions()))
                && (this.getRiskRequirement() == null ? other.getRiskRequirement() == null : this.getRiskRequirement().equals(other.getRiskRequirement()))
                && (this.getReserve1() == null ? other.getReserve1() == null : this.getReserve1().equals(other.getReserve1()))
                && (this.getReserve2() == null ? other.getReserve2() == null : this.getReserve2().equals(other.getReserve2()))
                && (this.getReserve3() == null ? other.getReserve3() == null : this.getReserve3().equals(other.getReserve3()))
                && (this.getReserve4() == null ? other.getReserve4() == null : this.getReserve4().equals(other.getReserve4()))
                && (this.getReserve5() == null ? other.getReserve5() == null : this.getReserve5().equals(other.getReserve5()))
                && (this.getDelFlg() == null ? other.getDelFlg() == null : this.getDelFlg().equals(other.getDelFlg()))
                && (this.getCreateUserid() == null ? other.getCreateUserid() == null : this.getCreateUserid().equals(other.getCreateUserid()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateUserid() == null ? other.getUpdateUserid() == null : this.getUpdateUserid().equals(other.getUpdateUserid()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getJrProductName() == null) ? 0 : getJrProductName().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
        result = prime * result + ((getInstalmentPeriod() == null) ? 0 : getInstalmentPeriod().hashCode());
        result = prime * result + ((getCreditLine() == null) ? 0 : getCreditLine().hashCode());
        result = prime * result + ((getJrProductType() == null) ? 0 : getJrProductType().hashCode());
        result = prime * result + ((getRepaymentType() == null) ? 0 : getRepaymentType().hashCode());
        result = prime * result + ((getUrlPayPc() == null) ? 0 : getUrlPayPc().hashCode());
        result = prime * result + ((getUrlPayMoble() == null) ? 0 : getUrlPayMoble().hashCode());
        result = prime * result + ((getUrlAddDetailInfoPc() == null) ? 0 : getUrlAddDetailInfoPc().hashCode());
        result = prime * result + ((getUrlAddDetailInfoMobile() == null) ? 0 : getUrlAddDetailInfoMobile().hashCode());
        result = prime * result + ((getUrlAppDownload() == null) ? 0 : getUrlAppDownload().hashCode());
        result = prime * result + ((getAccountType() == null) ? 0 : getAccountType().hashCode());
        result = prime * result + ((getBankCardNumber() == null) ? 0 : getBankCardNumber().hashCode());
        result = prime * result + ((getBankId() == null) ? 0 : getBankId().hashCode());
        result = prime * result + ((getBankName() == null) ? 0 : getBankName().hashCode());
        result = prime * result + ((getOpeningBank() == null) ? 0 : getOpeningBank().hashCode());
        result = prime * result + ((getAccountName() == null) ? 0 : getAccountName().hashCode());
        result = prime * result + ((getBankBranchCodeLh() == null) ? 0 : getBankBranchCodeLh().hashCode());
        result = prime * result + ((getBankAccountProvince() == null) ? 0 : getBankAccountProvince().hashCode());
        result = prime * result + ((getApplicationConditions() == null) ? 0 : getApplicationConditions().hashCode());
        result = prime * result + ((getRiskRequirement() == null) ? 0 : getRiskRequirement().hashCode());
        result = prime * result + ((getReserve1() == null) ? 0 : getReserve1().hashCode());
        result = prime * result + ((getReserve2() == null) ? 0 : getReserve2().hashCode());
        result = prime * result + ((getReserve3() == null) ? 0 : getReserve3().hashCode());
        result = prime * result + ((getReserve4() == null) ? 0 : getReserve4().hashCode());
        result = prime * result + ((getReserve5() == null) ? 0 : getReserve5().hashCode());
        result = prime * result + ((getDelFlg() == null) ? 0 : getDelFlg().hashCode());
        result = prime * result + ((getCreateUserid() == null) ? 0 : getCreateUserid().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateUserid() == null) ? 0 : getUpdateUserid().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", jrProductName=").append(jrProductName);
        sb.append(", companyId=").append(companyId);
        sb.append(", companyName=").append(companyName);
        sb.append(", instalmentPeriod=").append(instalmentPeriod);
        sb.append(", creditLine=").append(creditLine);
        sb.append(", jrProductType=").append(jrProductType);
        sb.append(", repaymentType=").append(repaymentType);
        sb.append(", urlPayPc=").append(urlPayPc);
        sb.append(", urlPayMoble=").append(urlPayMoble);
        sb.append(", urlAddDetailInfoPc=").append(urlAddDetailInfoPc);
        sb.append(", urlAddDetailInfoMobile=").append(urlAddDetailInfoMobile);
        sb.append(", urlAppDownload=").append(urlAppDownload);
        sb.append(", accountType=").append(accountType);
        sb.append(", bankCardNumber=").append(bankCardNumber);
        sb.append(", bankId=").append(bankId);
        sb.append(", bankName=").append(bankName);
        sb.append(", openingBank=").append(openingBank);
        sb.append(", accountName=").append(accountName);
        sb.append(", bankBranchCodeLh=").append(bankBranchCodeLh);
        sb.append(", bankAccountProvince=").append(bankAccountProvince);
        sb.append(", applicationConditions=").append(applicationConditions);
        sb.append(", riskRequirement=").append(riskRequirement);
        sb.append(", reserve1=").append(reserve1);
        sb.append(", reserve2=").append(reserve2);
        sb.append(", reserve3=").append(reserve3);
        sb.append(", reserve4=").append(reserve4);
        sb.append(", reserve5=").append(reserve5);
        sb.append(", delFlg=").append(delFlg);
        sb.append(", createUserid=").append(createUserid);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateUserid=").append(updateUserid);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}